home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 78
/
64er_Magazin_Sonderheft_78_19xx_Markt__Technik_de_Side_A.d64
/
get printer
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
2KB
|
133 lines
100 goto 190
110 :
120 n$="get printer"
130 open 1,8,15,"s:"+n$+".bak": close 1
140 open 1,8,15,"r:"+n$+".bak="+n$+".bas": close 1
150 save n$+".bas",8
160 verify n$+".bas",8
170 end
180 :
190 read d1%,d2%
200 in$=""
210 read a: if a>0 then in$=in$+chr$(a): goto 210
220 read dx%,dy%,dl%,dr%,do%,du%
230 ct=52224
240 for i=0 to 255: poke ct+i,i: next i
250 read a$,a: if a>0 then poke ct+asc(a$),a: goto 250
260 :
270 print"[147][196]ruckertreiber '[208][210][201][206][212][197][210][195][207][196][197][211]' wird"
280 print"gespeichert...":n$="printercodes"
290 open 2,8,15,("s:"+n$): close 2
300 open 2,8,2,(n$+",p,w")
310 print#2,chr$(d1%);chr$(d2%);
320 print#2,chr$(len(in$));: i%=0
330 if i%=len(in$) then 350
340 i%=i%+1: print#2,mid$(in$,i%,1);: goto 330
350 print#2,chr$(dx%);chr$(dy%);chr$(dl%);chr$(dr%);chr$(do%);chr$(du%);
360 for i=0 to 255
370 : print#2,chr$(peek(ct+i));
380 next i
390 close 2: end
400 :
410 data 4,7: rem geraet, sekundaeradr.
420 data 13,13,13,-1: rem schriftart
430 data 80: rem spalten
440 data 72: rem zeilen (0=endlos)
450 :
460 data 10: rem linker rand
470 data 10: rem recher rand
480 data 0: rem oberer rand
490 data 0: rem unterer rand
500 :
510 data "a", 65
520 data "b", 66
530 data "c", 67
540 data "d", 68
550 data "e", 69
560 data "f", 70
570 data "g", 71
580 data "h", 72
590 data "i", 73
600 data "j", 74
610 data "k", 75
620 data "l", 76
630 data "m", 77
640 data "n", 78
650 data "o", 79
660 data "p", 80
670 data "q", 81
680 data "r", 82
690 data "s", 83
700 data "t", 84
710 data "u", 85
720 data "v", 86
730 data "w", 87
740 data "x", 88
750 data "y", 89
760 data "z", 90
770 :
780 data "[193]",193
790 data "[194]",194
800 data "[195]",195
810 data "[196]",196
820 data "[197]",197
830 data "[198]",198
840 data "[199]",199
850 data "[200]",200
860 data "[201]",201
870 data "[202]",202
880 data "[203]",203
890 data "[204]",204
900 data "[205]",205
910 data "[206]",206
920 data "[207]",207
930 data "[208]",208
940 data "[209]",209
950 data "[210]",210
960 data "[211]",211
970 data "[212]",212
980 data "[213]",213
990 data "[214]",214
1000 data "[215]",215
1010 data "[216]",216
1020 data "[217]",217
1030 data "[218]",218
1040 :
1050 data "0", 48
1060 data "1", 49
1070 data "2", 50
1080 data "3", 51
1090 data "4", 52
1100 data "5", 53
1110 data "6", 54
1120 data "7", 55
1130 data "8", 56
1140 data "9", 57
1150 :
1160 data " ", 32
1170 data "#", 35
1180 data "(", 40
1190 data ")", 41
1200 data "+", 43
1210 data ",", 44
1220 data "-", 45
1230 data ".", 46
1240 data ":", 58
1250 data "<", 60
1260 data "=", 61
1270 data ">", 62
1280 data "?", 63
1290 :
1300 data "[192]",192
1310 data "[221]",221
1320 data "[176]",176
1330 data "[174]",174
1340 data "[189]",189
1350 data "[173]",173
1360 data "[178]",178
1370 data "[179]",179
1380 data "[177]",177
1390 data "[171]",171
1400 :
1410 data "ende",-1